Skip to content

Conversation

@ELVIS-KATO
Copy link
Contributor

@ELVIS-KATO ELVIS-KATO commented Nov 11, 2025

Requirements

  • This PR has a title that briefly describes the work done including a conventional commit type prefix and a Jira ticket number if applicable. See existing PR titles for inspiration.
  • My work is based on designs, which are linked or shown either in the Jira ticket or the description below.
  • My work includes tests or is validated by existing tests.

Summary

I have added a validation functionality to prevent bill creation for patients without active visits.
This mainly checks whether the patient has an active visit, and if they do not have one, it shows a validation error "Patient must have an active visit". I have provided a short video to explain better.

Screenshots

A short video below:

validation.mp4

Related Issue

https://openmrs.atlassian.net/issues?filter=-4&selectedIssue=O3-5173

Other

@VeronicaMuthee @denniskigen

@denniskigen
Copy link
Member

denniskigen commented Nov 12, 2025

So, as far as I'm aware, the issue here is that the Bill data model in the backend has no knowledge of a Visit. If we want to create a coupling between the two, I imagine we'd need to it in the backend first. Right, @ibacher?

@denniskigen denniskigen changed the title (fix)O3-5173 System should validate that patient has an active visit before allowing bill creation" (fix)O3-5173 System should validate that patient has an active visit before allowing bill creation Nov 12, 2025
@denniskigen denniskigen changed the title (fix)O3-5173 System should validate that patient has an active visit before allowing bill creation (fix) O3-5173: Validate existence of an active visits for a patient before allowing bill creation Nov 12, 2025
@denniskigen denniskigen changed the title (fix) O3-5173: Validate existence of an active visits for a patient before allowing bill creation (fix) O3-5173: Validate existence of an active visit for a patient before allowing bill creation Nov 12, 2025
@ibacher
Copy link
Member

ibacher commented Nov 12, 2025

Yes, but also, it's not clear to me that this is work to be done: https://openmrs.slack.com/archives/C06D4666UQ7/p1762876063229869?thread_ts=1762872479.872659&cid=C06D4666UQ7

@denniskigen
Copy link
Member

Set to draft because this should evolve into a Talk post or something similar.

@denniskigen denniskigen marked this pull request as draft December 2, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants